<?php
/**
 * P�gina de Login do sistema.
*/

if(!isset($_SESSION))
{
    session_start();
}

if( isset( $_SESSION['servidorPerfil'] )) 
{
        header("Location: PaginaPrincipal.php");
}
?>
<html>
	<head>
		<title> SAEO - Sistema de Acompanhamento de Execu�ao Or�ament�ria - IFAL </title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 		<link rel='stylesheet' type='text/css' href='templates/estilos.css'>
 		<link rel='stylesheet' type='text/css' href='templates/hintbox.css'>
 		
 		<script type='text/javascript' src='templates/hintbox.js'></script>
 		<script type='text/javascript' src='templates/validacoes.js'></script>
	</head>
	<script type='text/javascript'>
	function div()
	{
			<?php 
	         if(!empty($_SESSION['mensagem']))
	         {
	             echo" document.getElementById('mensagemAlerta').style.display = 'block';";
	         }
	         else
	         {
	             echo" document.getElementById('mensagemAlerta').style.display = 'none';";
	         }
	         ?>
	}
	</script>
	<body class='body' onload='javascript:document.formLogin.usuario.focus();div();'>
		<form action='validarLogin.php' method='post' name='formLogin' onsubmit='return ValidarLogin();'>
		<table width='779' border='0' cellspacing='0' cellpadding='0' align='center'>
  			<tr>
    			<td height='112' background='templates/banner.JPG'></td>
  			</tr>
  			<tr>
    		<td> 
    			<div class='titulosTabelas'>EFETUAR LOGIN</div>
    		</td>
  			</tr>
  			<tr>
      			<td style='background-color:#FFFFFF'>&nbsp;</td>
  			</tr>
  			<tr>
       		<td>
       			<div class='mensagemAlertaLogin' style='display:none' id='mensagemAlerta'>
	             <?php 
	             if(!empty($_SESSION['mensagem']))
	             {
	                 echo "".$_SESSION['mensagem']."";
	                 $_SESSION['mensagem']="";
	             }
	             ?>
	             </div>
       		</td>
  			</tr>
  			<tr>
	    		<td bgcolor='#FFFFFF' height='300'>
	        		<table class='tabela' width='290' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#FFFFFF'>
	               		<tr>
	  	               		<td colspan='2'>&nbsp;</td>
	               		</tr>
	               		<tr>
	                   		<td height='28' class='textoTabelas'>&nbsp;Usu&aacute;rio:</td>
	                   		<td>
	                   			<input class='inputTexto' name='usuario' type='text' size='20' maxlength='15' /> <a href='#' class='hintanchor' onMouseover='showhint("Digite seu usu�rio de acesso no sistema.", this, event, "220px");'>[?]</a>
	                   		</td>
	               		</tr>
	               		<tr>
	                   		<td height='28' class='textoTabelas'>&nbsp;Senha:</td>
	                   		<td>
	                   			<input class='inputTexto' name='senha' type='password' size='20' maxlength='12' /> <a href='#' class='hintanchor' onMouseover='showhint("M�nimo de 6 e m�ximo de 12 d�gitos. Apenas n�meros.", this, event, "220px");'>[?]</a>
	                   		</td>
	               		</tr>	
	               		<tr>
	                   		<td colspan='2' height='46'>
	                   			<input type='submit' class='botao' value='Login' style='margin-left:200px' />
	                   		</td>
	               		</tr>
	        		</table>
				<div id='email' class='textoCentralizado' style='margin-top: 30px;'> Solicite seu login, <a class='link' href='javascript:;' onclick="JavaScript: alert('FALTA FAZER! =)')">clicando aqui.</a><br /></div>
	    		</td>
  			</tr>
			<tfoot>
				<tr>
					<?php include 'rodapeCreditos.php'; ?>
	            </tr>
			</tfoot>
		</table>
		</form>
	</body>
</html>